package com.itheima.commons.model.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/*
 * @ProjectName:project-exercise
 * @Package:com.itheima.commons.model.vo
 * @ClassName:IndustryDistributionVo
 * @Author:ZHANG
 * @Date:2021-12-16 20:06
 * @Description:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IndustryDistributionVo implements Serializable, Comparable<IndustryDistributionVo> {
    //行业分布
    private String title;

    @Override
    public int compareTo(IndustryDistributionVo o) {
        return o.getAmount() - this.getAmount();
    }

    private Integer amount;

}
